package com.tcwlkj.uuService.NetWork;

import com.tcwlkj.uuService.model.AddressModel;
import com.tcwlkj.uuService.model.BindingBankModel;
import com.tcwlkj.uuService.model.CommonResponse;
import com.tcwlkj.uuService.model.DriverDetailModel;
import com.tcwlkj.uuService.model.GoodEvaluteModel;
import com.tcwlkj.uuService.model.ImageUrlModel;
import com.tcwlkj.uuService.model.LastFeedModle;
import com.tcwlkj.uuService.model.LoginModel;
import com.tcwlkj.uuService.model.MessageDetailModel;
import com.tcwlkj.uuService.model.MessageModel;
import com.tcwlkj.uuService.model.MyAccountModel;
import com.tcwlkj.uuService.model.OrderModel;
import com.tcwlkj.uuService.model.PopupModel;
import com.tcwlkj.uuService.model.ProfitDataModel;
import com.tcwlkj.uuService.model.PutQuestion;
import com.tcwlkj.uuService.model.QrCodeModel;
import com.tcwlkj.uuService.model.ShareModel;
import com.tcwlkj.uuService.model.TokenModel;
import com.tcwlkj.uuService.model.UpDateVersionModel;
import com.tcwlkj.uuService.model.UserCardModel;
import com.tcwlkj.uuService.model.VerificationCodeModel;
import com.tcwlkj.uuService.model.XieYiModel;
import com.tcwlkj.uuService.model.checkModel;
import com.tcwlkj.uuService.model.cityIDModel;

import java.util.ArrayList;
import java.util.List;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

import static com.baidu.location.h.h.T;

/**
 * Created by Administrator on 2017/10/8 0008.
 */

public interface RequestServes {
    @GET("geocoder")
    Call<AddressModel> getaddress(@Query("output") String output, @Query("location") String location, @Query("key") String key);//调用百度地图接口
    @GET("Maps/GeoAddr")
    Call<CommonResponse<AddressModel.ResultBean>> getCityAddress(@Query("lng") String lng, @Query("lat") String lat);//调用百度地图接口

//    @GET(".")
//    Call<GoodEvaluteModel> Get_Evaluate(@Query("action") String action, @Query("Type") String type);//荣誉榜好评
//
//    @GET(".")
//    Call<ProfitDataModel> Get_Profit(@Query("action") String action, @Query("Type") String type);//荣誉榜收入


    @GET("ranking/useevaluate")
    Call<CommonResponse<List<GoodEvaluteModel>>> Get_Evaluate(@Query("days") String days, @Query("flag") String flag,@Query("utype") String utype);//荣誉榜好评

    @GET("ranking/useincome")
    Call<CommonResponse<List<GoodEvaluteModel>>> Get_Profit(@Query("days") String days);//荣誉榜收入

    @GET(".")
    Call<XieYiModel> Get_AppText(@Query("action") String action, @Query("Flag") String type);//同城课堂（跑男协议）

    @GET("cont/detail")
    Call<CommonResponse<String>> get_xieyi(@Query("code") String code);//同城课堂（跑男协议）


    @GET(".")
    Call<UpDateVersionModel> Get_Version(@Query("action") String action, @Query("type") String type);//版本升级


    @GET("appup/check")
    Call<CommonResponse<checkModel>> check(@Query("ctype") String ctype, @Query("cplat") String cplat, @Query("cver") String cver);//版本升级

    @GET("auth/gettoken")
    Call<CommonResponse<TokenModel>> gettoken(@Query("type") String type);//获取Token
    @GET("auth/getopenid")
    Call<CommonResponse> getopenid(@Query("token") String token);//获取getopenid

    @POST("auth/getcode")
    @FormUrlEncoded
    Call<CommonResponse<VerificationCodeModel>> getcode( @Field("mkey") String mkey, @Field("types") String types);//获取验证码

    @POST("order/getcode")
    @FormUrlEncoded
    Call<CommonResponse<Object>> getOrderCode( @Field("orderid") String orderid, @Field("type") String type);//获取收货验证码

    @POST("account/register")
    @FormUrlEncoded
    Call<CommonResponse<LoginModel>> Register( @Field("action") String action, @Field("mobile") String mobile,
                                           @Field("pass") String pass, @Field("vcode") String vcode, @Field("regcity") String regcity,
                                           @Field("device") String device);//注册

    @POST("account/goto")
    @FormUrlEncoded
    Call<CommonResponse<LoginModel>> Login(@Field("action") long action, @Field("loginid") String loginid,
                                       @Field("password") String password, @Field("mode") Integer mode, @Field("plat") Integer plat,
                                       @Field("city") String city, @Field("device") String device);//登录

    @GET("account/ddetail")
    Call<CommonResponse<DriverDetailModel>> ddetail(@Query("did") String did);//获取跑男详情


    @POST("feedback/lastfeed")
    @FormUrlEncoded
    Call<CommonResponse<LastFeedModle>> getLastFeed(@Field("userid") String userid, @Field("pindex") int pindex,@Field("psize") int psize);//获取反馈详情

    @POST("feedback/putquest")
    @FormUrlEncoded
    Call<CommonResponse> putquest(@Field("userid") String userid, @Field("qtype") int qtype, @Field("qtext") String qtext, @Field("expid") long expid, @Field("exorder") long exorder, @Field("device") int device);//在线客服发送内容

    @POST("account/upass")
    @FormUrlEncoded
    Call<CommonResponse> upass(@Field("action") String action, @Field("utype") int utype,@Field("vcode") String vcode,@Field("mobile") String mobile,@Field("npass") String npass,@Field("opass") String opass);//修改密码

    @POST("account/upass")
    @FormUrlEncoded
    Call<CommonResponse<Object>> forgetPass(@Field("action") String action, @Field("utype") int utype,@Field("vcode") String vcode,@Field("mobile") String mobile,@Field("npass") String npass);//忘记密码

    @POST("upload/base64")
    @FormUrlEncoded
    Call<CommonResponse<ImageUrlModel>> upload(@Field("data") String Data, @Field("imgfile") String imgfile, @Field("fname") String fname);//上传图片


    @POST("account/subauth")
    @FormUrlEncoded
    Call<CommonResponse> uploadID(@Field("userid") String userid, @Field("cityid") String cityid,@Field("rname") String rname,@Field("idcard") String idcard,@Field("ctype") String ctype,@Field("linknum") String linknum,
                                          @Field("phead") String phead,@Field("phold") String phold,@Field("pfront") String pfront,@Field("pback") String pback);//上传身份认证

    @GET("fakejs/GetData")
    Call<CommonResponse<List<cityIDModel>>> getCity(@Query("t") String t);//获取各城市信息

    @GET("account/rqrcode")
    Call<CommonResponse<QrCodeModel>> rqrcode(@Query("userid") long userid);//获取二维码

    @POST("card/append")
    @FormUrlEncoded
    Call<CommonResponse<BindingBankModel>> append(@Field("userid") long userid, @Field("type") int type, @Field("name") String name, @Field("number")
            String number, @Field("bank") String bank, @Field("bname") String bname, @Field("baddr") String baddr);//绑定银行卡

    @GET("card/usecard")
    Call<CommonResponse<UserCardModel>> usercard(@Query("userid") int userid,@Query("type") int type);//获取银行卡记录


    @POST("order/uselist")
    @FormUrlEncoded
    Call<CommonResponse<ArrayList<OrderModel>>> orderlist(@Field("userid") String userid,@Field("type") int type,@Field("state") int state, @Field("pindex") int pindex, @Field("psize") int psize);//获取订单列表

    @POST("account/uinfo")
    @FormUrlEncoded
    Call<CommonResponse> updateWork(@Field("action") String action, @Field("userid") String userid, @Field("nval") String nval);//开工收工


    @POST("account/uinfo")
    @FormUrlEncoded
    Call<CommonResponse> SubmitJPushID(@Field("action") String action, @Field("userid") String userid, @Field("nval") String nval);//上传极光

    @POST("account/uploc")
    @FormUrlEncoded
    Call<CommonResponse> updateLocation(@Field("userid") String userid, @Field("point") String point, @Field("device") String device,@Field("oids") String oids,@Field("work") String work);//位置更新

    @POST("order/grabbill")
    @FormUrlEncoded
    Call<CommonResponse> grab(@Field("orderid") String orderid, @Field("userid") String userid, @Field("type") int type, @Field("point") String point);//抢单

    @POST("notice/uselist")
    @FormUrlEncoded
    Call<CommonResponse<ArrayList<MessageModel>>> uselist(@Field("userid") String userid, @Field("pindex") int pindex, @Field("psize") int psize);//消息列表

    @POST("notice/useinfo")
    @FormUrlEncoded
    Call<CommonResponse<MessageDetailModel>> useinfo(@Field("noticeid") String noticeid);//消息详情

    @POST("trade/flowrecord")
    @FormUrlEncoded
    Call<CommonResponse<MyAccountModel>> flowrecord(@Field("action") String action, @Field("accid") String accid, @Field("utype") String utype, @Field("pindex") int pindex, @Field("psize") int psize);//交易流水
//CommonResponse<ArrayList<MyAccountModel>>
    @POST("order/cancle")
    @FormUrlEncoded
    Call<CommonResponse<Object>> cancle(@Field("orderid") String orderid, @Field("userid") String userid, @Field("note") String note, @Field("point") String point);//取消订单

    @POST("order/state")
    @FormUrlEncoded
    Call<CommonResponse<Object>> state(@Field("orderid") String orderid, @Field("userid") String userid, @Field("state") String state, @Field("point") String point);//订单状态更新

    @POST("params/share")
    @FormUrlEncoded
    Call<CommonResponse<ShareModel>> share(@Field("userid") String userid, @Field("plat") String plat);//分享

    @POST("trade/withdraw")
    @FormUrlEncoded
    Call<CommonResponse<Object>> withdraw(@Field("userid") String userid, @Field("money") String money);//余额提现

    @POST("account/logout")
    @FormUrlEncoded
    Call<CommonResponse<Object>> logout(@Field("action") String action, @Field("userid") String userid);//退出登录

    @POST("order/finish")
    @FormUrlEncoded
    Call<CommonResponse<Object>> finish(@Field("orderid") String orderid, @Field("userid") String userid,@Field("code") String code,@Field("point") String point);//完成订单

    @POST("params/apppopup")
    @FormUrlEncoded
    Call<CommonResponse<List<PopupModel>>> popup(@Field("userid") String userid, @Field("plat") String plat, @Field("point") String point);//活动接口

    @POST("order/call")
    @FormUrlEncoded
    Call<CommonResponse<Object>> call(@Field("amobile") String amobile, @Field("bmobile") String bmobile, @Field("orderid") String orderid, @Field("flag") String flag);//打电话接口

    @POST("account/chpass")
    @FormUrlEncoded
    Call<CommonResponse> chpass(@Field("userid") String userid, @Field("pass") String pass);//密码验证

    @POST("account/termin")
    @FormUrlEncoded
    Call<CommonResponse> termin(@Field("userid") String userid, @Field("note") String note);//解约申请

}
